package com.xu.myTest;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.xu.model.Student;

import java.util.List;
import java.util.Map;

/**
 * 对象转json字符
 */
public class Json2List {

    public static void main(String[] args) {
        String value = "[{\"student_id\":\"001\",\"student_name\":\"静静\"},{\"student_id\":\"002\",\"student_name\":\"小明\"}]";

        List<Student> list = JSONArray.parseArray(value,Student.class);

        System.out.println(JSON.toJSONString(list));
    }


}
